package com.djx.threadstudy.Thread;

import lombok.SneakyThrows;

/**
 * @ClassName ThreadSleep
 * @Date 2021/7/9 0009 上午 9:25
 * @Author Administrator
 * @Description 线程睡眠
 * Version 1.0
 */
public class ThreadSleep01 implements Runnable{
    @SneakyThrows
    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {

            System.out.println(i);
            if (i==200){
                Thread.sleep(2000);

            }
        }
    }

    public static void main(String[] args) {
        new Thread(new ThreadSleep01()).start();
    }
}
